Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 82de472f2d17559a1a48511cfce45144ce6e9580


Parents : 3b56304
Author : Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-05-03T14:04:00-05:00

refactor(LxmfUserIcon): remove seed property and related color generation logic; add test for outbound location sharing

Changes

2 files changed, 19 insertions(+), 14 deletions(-)


Diff

diff --git a/meshchatx/src/frontend/components/LxmfUserIcon.vue b/meshchatx/src/frontend/components/LxmfUserIcon.vue
index b403ddb0..fd00adb1 100644
--- a/meshchatx/src/frontend/components/LxmfUserIcon.vue
+++ b/meshchatx/src/frontend/components/LxmfUserIcon.vue
@@ -51,10 +51,6 @@ export default {
type: String,
default: "",
},
- seed: {
- type: String,
- default: "",
- },
iconClass: {
type: String,
default: "",
@@ -93,16 +89,7 @@ export default {
if (this.iconBackgroundColour && this.iconBackgroundColour !== "") {
return this.iconBackgroundColour;
}
- if (!this.seed) {
- return "";
- }
- // Simple deterministic color from seed string
- let hash = 0;
- for (let i = 0; i < this.seed.length; i++) {
- hash = this.seed.charCodeAt(i) + ((hash << 5) - hash);
- }
- const h = Math.abs(hash % 360);
- return `hsl(${h}, 35%, 85%)`;
+ return "";
},
},
};

diff --git a/tests/backend/test_lxmf_utils_extended.py b/tests/backend/test_lxmf_utils_extended.py
index 850289d1..a8246269 100644
--- a/tests/backend/test_lxmf_utils_extended.py
+++ b/tests/backend/test_lxmf_utils_extended.py
@@ -354,6 +354,24 @@ def test_sidebar_preview_telemetry_location_incoming():
assert out == "Riley shared their location"
+def test_sidebar_preview_telemetry_location_outbound_you():
+ me = "c" * 32
+ row = {
+ "content": "",
+ "fields": json.dumps(
+ {"telemetry": {"location": {"latitude": 1.0, "longitude": 2.0}}},
+ ),
+ "is_incoming": 0,
+ "source_hash": me,
+ }
+ out = lxmf_sidebar_preview_for_conversation_latest_row(
+ row,
+ local_hash=me,
+ peer_display_name="Sam",
+ )
+ assert out == "You shared your location"
+
+
def test_sidebar_preview_location_request_outbound_you():
me = "c" * 32
row = {


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────